package br.com.dev.tcc.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Corretor implements Serializable {

	private static final long serialVersionUID = -5873849094330430917L;

	private int id;
	private String name;
	private List<String> phones;
	private String email;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getPhones() {
		return phones;
	}

	public void setPhones(List<String> phones) {
		this.phones = phones;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public void addPhone(String phone){
		
		if(phones == null) phones = new ArrayList<String>();
		
		phones.add(phone);
	}
	
	public boolean hasPhone(){
		
		return phones != null && phones.size() > 0;
	}

	public boolean hasEmail() {

		return email.length() > 0;
	}
}
